package com.yyl.service.impl;

import com.yyl.entity.Dept;
import com.yyl.mapper.IDeptMapper;
import com.yyl.service.IDeptService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;

@Service
public class DeptServiceImpl implements IDeptService {
    @Resource
    private IDeptMapper deptMapper;
    public List<Dept> deptList() {

        return deptMapper.selectAll();
    }

    public int addDept(Dept dept) {
        return deptMapper.addDept(dept);
    }

    public int updDept(Dept dept) {
        return deptMapper.updDept(dept);
    }

    public int del(int id) {
       return deptMapper.delDept(id);
    }
}
